package com.csap.framework.oauth2.request;

import com.csap.framework.annotation.apidoc.ApiModel;
import com.csap.framework.annotation.apidoc.ApiModelProperty;
import com.csap.framework.oauth2.UserAttribute;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import java.util.List;
import java.util.Set;

/**
 * 根据openId登录 内部使用(第三方)
 *
 * @author yangchengfu
 * @dataTime 2021年-07月-30日 15:48:00
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Accessors(chain = true)
@ApiModel(value = "openId登录信息")
public class MobileRequest {
    @ApiModelProperty(value = "客户端ID", forceReq = true, required = true)
    private String clientId;
    @ApiModelProperty(description = "平台标识", value = "平台标识", forceReq = true, required = true)
    private String platform;
    @ApiModelProperty(value = "登录的类型")
    private String loginType;
    @ApiModelProperty(value = "登录的类型", forceReq = true)
    private String deviceType;
    @ApiModelProperty(description = "邮箱", value = "邮箱", forceReq = true)
    private String email;
    @ApiModelProperty(description = "昵称", value = "昵称", forceReq = true, required = true)
    @NotEmpty(message = "昵称不能为空")
    private String nickName;
    @ApiModelProperty(description = "头像", value = "头像", forceReq = true)
    private String avatar;
    @ApiModelProperty(description = "手机号码", value = "手机号码", forceReq = true, required = true)
    @NotEmpty(message = "手机号码不能为空")
    private String mobile;
    @ApiModelProperty(description = "性别", value = "性别", forceReq = true)
    private Integer sex;
    @ApiModelProperty(description = "年龄", value = "年龄", forceReq = true)
    private Integer age;
    @ApiModelProperty(description = "注册的IP", value = "注册的IP", forceReq = true)
    private String ip;
    @ApiModelProperty(description = "用户属性", value = "用户属性", forceReq = true)
    private List<UserAttribute> userAttribute;
    @ApiModelProperty(description = "角色ID", value = "角色ID", forceRep = true)
    private Set<Long> roleList;
}
